/*
 * Copyright (C) 2017 Baidu, Inc. All Rights Reserved.
 */
package com.hundredhealth.rose.util;

import android.content.Context;

import java.io.File;

public class FileUtil {

    public static File getSaveFile(Context context) {
        File file = new File(context.getFilesDir(), "pic.jpg");
        return file;
    }

    public static long getFileSize(File f) {
        long size = 0L;
        if (f != null && f.exists()) {
            File flist[] = f.listFiles();
            for (File aFlist : flist) {
                size += aFlist.isDirectory() ? getFileSize(aFlist) : aFlist.length();
            }
        }
        return size;
    }
}
